package vip.zhenzicheng.design_patterns.strategy;

/**
 * 促销员(环境类)
 *
 * @author zhenzicheng
 * @date 2022-05-26 18:29
 */
public class SalesMan {

  //聚合策略类对象
  private Strategy strategy;

  public SalesMan(Strategy strategy) {
    this.strategy = strategy;
  }

  public Strategy getStrategy() {
    return strategy;
  }

  public void setStrategy(Strategy strategy) {
    this.strategy = strategy;
  }

  //由促销员展示促销活动给用户
  public void salesManShow() {
    strategy.show();
  }
}
